Optimal. Leaf size=189 \[ -\frac{3 i d^2 (c+d x)}{4 f^3 (a+i a \tan (e+f x))}+\frac{3 d (c+d x)^2}{4 f^2 (a+i a \tan (e+f x))}+\frac{i (c+d x)^3}{2 f (a+i a \tan (e+f x))}-\frac{3 d (c+d x)^2}{8 a f^2}-\frac{i (c+d x)^3}{4 a f}+\frac{(c+d x)^4}{8 a d}-\frac{3 d^3}{8 f^4 (a+i a \tan (e+f x))}+\frac{3 i d^3 x}{8 a f^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.198783, antiderivative size = 189, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3723, 3479, 8} \[ -\frac{3 i d^2 (c+d x)}{4 f^3 (a+i a \tan (e+f x))}+\frac{3 d (c+d x)^2}{4 f^2 (a+i a \tan (e+f x))}+\frac{i (c+d x)^3}{2 f (a+i a \tan (e+f x))}-\frac{3 d (c+d x)^2}{8 a f^2}-\frac{i (c+d x)^3}{4 a f}+\frac{(c+d x)^4}{8 a d}-\frac{3 d^3}{8 f^4 (a+i a \tan (e+f x))}+\frac{3 i d^3 x}{8 a f^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3723
Rule 3479
Rule 8
Rubi steps
\begin{align*} \int \frac{(c+d x)^3}{a+i a \tan (e+f x)} \, dx &=\frac{(c+d x)^4}{8 a d}+\frac{i (c+d x)^3}{2 f (a+i a \tan (e+f x))}-\frac{(3 i d) \int \frac{(c+d x)^2}{a+i a \tan (e+f x)} \, dx}{2 f}\\ &=-\frac{i (c+d x)^3}{4 a f}+\frac{(c+d x)^4}{8 a d}+\frac{3 d (c+d x)^2}{4 f^2 (a+i a \tan (e+f x))}+\frac{i (c+d x)^3}{2 f (a+i a \tan (e+f x))}-\frac{\left (3 d^2\right ) \int \frac{c+d x}{a+i a \tan (e+f x)} \, dx}{2 f^2}\\ &=-\frac{3 d (c+d x)^2}{8 a f^2}-\frac{i (c+d x)^3}{4 a f}+\frac{(c+d x)^4}{8 a d}-\frac{3 i d^2 (c+d x)}{4 f^3 (a+i a \tan (e+f x))}+\frac{3 d (c+d x)^2}{4 f^2 (a+i a \tan (e+f x))}+\frac{i (c+d x)^3}{2 f (a+i a \tan (e+f x))}+\frac{\left (3 i d^3\right ) \int \frac{1}{a+i a \tan (e+f x)} \, dx}{4 f^3}\\ &=-\frac{3 d (c+d x)^2}{8 a f^2}-\frac{i (c+d x)^3}{4 a f}+\frac{(c+d x)^4}{8 a d}-\frac{3 d^3}{8 f^4 (a+i a \tan (e+f x))}-\frac{3 i d^2 (c+d x)}{4 f^3 (a+i a \tan (e+f x))}+\frac{3 d (c+d x)^2}{4 f^2 (a+i a \tan (e+f x))}+\frac{i (c+d x)^3}{2 f (a+i a \tan (e+f x))}+\frac{\left (3 i d^3\right ) \int 1 \, dx}{8 a f^3}\\ &=\frac{3 i d^3 x}{8 a f^3}-\frac{3 d (c+d x)^2}{8 a f^2}-\frac{i (c+d x)^3}{4 a f}+\frac{(c+d x)^4}{8 a d}-\frac{3 d^3}{8 f^4 (a+i a \tan (e+f x))}-\frac{3 i d^2 (c+d x)}{4 f^3 (a+i a \tan (e+f x))}+\frac{3 d (c+d x)^2}{4 f^2 (a+i a \tan (e+f x))}+\frac{i (c+d x)^3}{2 f (a+i a \tan (e+f x))}\\ \end{align*}
Mathematica [A] time = 0.627074, size = 278, normalized size = 1.47 \[ \frac{\sec (e+f x) (\cos (f x)+i \sin (f x)) \left (2 f^4 x \left (6 c^2 d x+4 c^3+4 c d^2 x^2+d^3 x^3\right ) (\cos (e)+i \sin (e))+(\cos (e)-i \sin (e)) \cos (2 f x) \left (6 c^2 d f^2 (1+2 i f x)+4 i c^3 f^3+6 c d^2 f \left (2 i f^2 x^2+2 f x-i\right )+d^3 \left (4 i f^3 x^3+6 f^2 x^2-6 i f x-3\right )\right )+(\cos (e)-i \sin (e)) \sin (2 f x) \left (6 c^2 d f^2 (2 f x-i)+4 c^3 f^3+6 c d^2 f \left (2 f^2 x^2-2 i f x-1\right )+d^3 \left (4 f^3 x^3-6 i f^2 x^2-6 f x+3 i\right )\right )\right )}{16 f^4 (a+i a \tan (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.194, size = 159, normalized size = 0.8 \begin{align*}{\frac{{d}^{3}{x}^{4}}{8\,a}}+{\frac{c{d}^{2}{x}^{3}}{2\,a}}+{\frac{3\,{c}^{2}d{x}^{2}}{4\,a}}+{\frac{{c}^{3}x}{2\,a}}+{\frac{{\frac{i}{16}} \left ( 4\,{d}^{3}{x}^{3}{f}^{3}-6\,i{d}^{3}{f}^{2}{x}^{2}+12\,c{d}^{2}{f}^{3}{x}^{2}-12\,ic{d}^{2}{f}^{2}x+12\,{c}^{2}d{f}^{3}x-6\,i{c}^{2}d{f}^{2}+4\,{c}^{3}{f}^{3}-6\,{d}^{3}fx+3\,i{d}^{3}-6\,c{d}^{2}f \right ){{\rm e}^{-2\,i \left ( fx+e \right ) }}}{a{f}^{4}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.51438, size = 370, normalized size = 1.96 \begin{align*} \frac{{\left (4 i \, d^{3} f^{3} x^{3} + 4 i \, c^{3} f^{3} + 6 \, c^{2} d f^{2} - 6 i \, c d^{2} f - 3 \, d^{3} +{\left (12 i \, c d^{2} f^{3} + 6 \, d^{3} f^{2}\right )} x^{2} +{\left (12 i \, c^{2} d f^{3} + 12 \, c d^{2} f^{2} - 6 i \, d^{3} f\right )} x + 2 \,{\left (d^{3} f^{4} x^{4} + 4 \, c d^{2} f^{4} x^{3} + 6 \, c^{2} d f^{4} x^{2} + 4 \, c^{3} f^{4} x\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{16 \, a f^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.929476, size = 372, normalized size = 1.97 \begin{align*} \begin{cases} \frac{\left (4 i a^{3} c^{3} f^{9} e^{6 i e} + 12 i a^{3} c^{2} d f^{9} x e^{6 i e} + 6 a^{3} c^{2} d f^{8} e^{6 i e} + 12 i a^{3} c d^{2} f^{9} x^{2} e^{6 i e} + 12 a^{3} c d^{2} f^{8} x e^{6 i e} - 6 i a^{3} c d^{2} f^{7} e^{6 i e} + 4 i a^{3} d^{3} f^{9} x^{3} e^{6 i e} + 6 a^{3} d^{3} f^{8} x^{2} e^{6 i e} - 6 i a^{3} d^{3} f^{7} x e^{6 i e} - 3 a^{3} d^{3} f^{6} e^{6 i e}\right ) e^{- 8 i e} e^{- 2 i f x}}{16 a^{4} f^{10}} & \text{for}\: 16 a^{4} f^{10} e^{8 i e} \neq 0 \\\frac{c^{3} x e^{- 2 i e}}{2 a} + \frac{3 c^{2} d x^{2} e^{- 2 i e}}{4 a} + \frac{c d^{2} x^{3} e^{- 2 i e}}{2 a} + \frac{d^{3} x^{4} e^{- 2 i e}}{8 a} & \text{otherwise} \end{cases} + \frac{c^{3} x}{2 a} + \frac{3 c^{2} d x^{2}}{4 a} + \frac{c d^{2} x^{3}}{2 a} + \frac{d^{3} x^{4}}{8 a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19524, size = 261, normalized size = 1.38 \begin{align*} \frac{{\left (2 \, d^{3} f^{4} x^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 8 \, c d^{2} f^{4} x^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 12 \, c^{2} d f^{4} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, d^{3} f^{3} x^{3} + 8 \, c^{3} f^{4} x e^{\left (2 i \, f x + 2 i \, e\right )} + 12 i \, c d^{2} f^{3} x^{2} + 12 i \, c^{2} d f^{3} x + 6 \, d^{3} f^{2} x^{2} + 4 i \, c^{3} f^{3} + 12 \, c d^{2} f^{2} x + 6 \, c^{2} d f^{2} - 6 i \, d^{3} f x - 6 i \, c d^{2} f - 3 \, d^{3}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{16 \, a f^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]